//
//  AXMyWeatherCell.m
//  AnXin100
//
//  Created by 天质弘耕 on 2018/11/12.
//  Copyright © 2018 tzhg. All rights reserved.
//

#import "AXMyWeatherCell.h"

@implementation AXMyWeatherCell


- (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier {
    
    if (self = [super initWithStyle:style reuseIdentifier:reuseIdentifier]) {
        
        [self creatView];
        [self setlayout];
    }
    return self;
}

- (void)creatView {
    
    self.weatherLabel = [[UILabel alloc]init];
    self.weatherLabel.font = FONT_FOURTEEN;
    self.weatherLabel.textColor = COLOR_DIV;
    [self.contentView addSubview:self.weatherLabel];
    
    self.weatherBtn = [[UIButton alloc]init];
    self.weatherBtn.borderWidth = 1;
    self.weatherBtn.borderColor = COLOR_Gray;
    self.weatherBtn.cornerRadius = 5;
    [self.contentView addSubview:self.weatherBtn];
    
    self.temperatureLabel = [[UILabel alloc]init];
    self.temperatureLabel.font = FONT_FOURTEEN;
    self.temperatureLabel.textColor = COLOR_DIV;
    [self.contentView addSubview:self.temperatureLabel];
    
    self.temperatureBtn = [[UIButton alloc]init];
    self.temperatureBtn .borderWidth = 1;
    self.temperatureBtn .borderColor = COLOR_Gray;
    self.temperatureBtn .cornerRadius = 5;
    [self.contentView addSubview:self.temperatureBtn];
    
    
}

- (void)setlayout {
    
    self.weatherLabel.sd_layout
    .leftSpaceToView(self.contentView, 10)
    .topSpaceToView(self.contentView, 7)
    .widthIs(30)
    .heightIs(30);
    
    self.weatherBtn.sd_layout
    .leftSpaceToView(self.weatherLabel, 10)
    .topSpaceToView(self.contentView, 7)
    .widthIs(100)
    .heightIs(30);
    
    self.temperatureBtn.sd_layout
    .rightSpaceToView(self.contentView, 10)
    .topSpaceToView(self.contentView, 7)
    .widthIs(100)
    .heightIs(30);
    
    self.temperatureLabel.sd_layout
    .rightSpaceToView(self.temperatureBtn, 10)
    .topSpaceToView(self.contentView, 7)
    .widthIs(30)
    .heightIs(30);
    
   
    
    
    
}

@end
